/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tk.eigh.ksvg.renderer.structure;


import tk.eigh.ksvg.renderer.SVGStructureRenderer;
import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import ksvg.structure.Definitions;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
import tk.eigh.ksvg.SVG;

/**
 *
 * @author nt
 */
@JSFRenderer(renderKitId="SVG",type="structure.SVGDefinitionsRenderer",family="structure.Container")
public class SVGDefinitionsRenderer extends SVGStructureRenderer{


    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        super.encodeBegin(context, component);

        ResponseWriter writer = context.getResponseWriter();
        Definitions definitions = (Definitions) component;
        writer.startElement(SVG.DEFINITIONS_TAG_NAME, component);
        renderCommonAttributes(writer,component,context);
        //SVGRendererUtils.renderImplementedAttributes(component, writer);
    }

    @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        super.encodeEnd(context, component);
        context.getResponseWriter().endElement(SVG.DEFINITIONS_TAG_NAME);
    }

}
